#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int main()
{
	int* str = (int*)malloc(sizeof(int) * 3);
	if (str == NULL)
	{
		perror("malloc");
		return 1;
	}
	for (int i = 0; i < 3; i++)
	{
		str[i] = i + 1;
	}
	for (int i = 0; i < 3; i++)
	{
		printf("%d ", str[i]);
	}
	int* ptr = (int*)realloc(str,sizeof(int) * 5);
	if (ptr == NULL)
	{
		perror("realooc");
		return 1;
	}
	str = ptr;
	for (int i = 0; i < 5; i++)
	{
		printf("%d ", str[i]);
	}
	free(str);
	str = NULL;
	return 0;
}